package mylib.archive.y2012.m08.CPR_Beta_1;

import mylib.dir.FastInputReader;
import mylib.dir.GeometryUtils;
import mylib.dir.PointF;

import java.io.PrintWriter;

public class taskC {
    public void solve(int testNumber, FastInputReader in, PrintWriter out) {
        PointF[] ptr = new PointF[3];
        for (int i = 0; i < 3; ++i) {
            double x = in.nextDouble();
            double y = in.nextDouble();
            ptr[i] = new PointF(x, y);
        }

        for (int side = 3; side <= 30; ++side) {
            for (int i = 0; i < side; ++i)
                for (int j = 0; j < side; ++j)
                    for (int k = 0; k < side; ++k) {
                        if (i == j || j == k || k == i)
                            continue;
                        if (check(ptr, side, i, j, k)) {
                            out.print(side);
                            return;
                        }
                    }
        }
        out.print(0);
    }

    private boolean check(PointF[] ptr, int side, int i, int j, int k) {
        double r1 = getR(i, j, ptr, side, 0, 1);
        double r2 = getR(i, k, ptr, side, 0, 2);
        double r3 = getR(j, k, ptr, side, 1, 2);
        return Math.abs(r1 - r2) < GeometryUtils.EPS && Math.abs(r1 - r3) < GeometryUtils.EPS &&
                Math.abs(r2 - r3) < GeometryUtils.EPS;
    }

    double getR(int i, int j, PointF[] f, int side, int k1, int k2) {
        double each = 2 * Math.PI / side;

        double arg = each * getDist(i, j, side);
        double dd = f[k1].distance(f[k2]);
        double r = Math.sqrt(dd * dd / (1 - Math.cos(arg)) / 2);
        return r;
    }

    int getDist(int i, int j, int side) {
        int dist = Math.abs(i - j);
        dist = Math.min(dist, Math.abs(i - j - side));
        dist = Math.min(dist, Math.abs(i + side - j));
        return dist;
    }
}
